package com.example.shengyin.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;


@Data
@ApiModel("文章类")
public class Article {
    @ApiModelProperty("编号")
    private Long id;
    @ApiModelProperty("内容")
    private String content;

    @NotNull(message = "分类不能为空")
    @ApiModelProperty("分类")
    private String type;

    @NotNull(message = "分类编码不能为空")
    @ApiModelProperty("分类编码")
    private String typecode;

    @ApiModelProperty("是否显示")
    private boolean isvalid;

    @ApiModelProperty("是否置顶")
    private int showorder;

    @ApiModelProperty("创建人")
    private String createby;

    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm")
    @ApiModelProperty("创建时间")
    private Date createtime;
    @ApiModelProperty("修改人")
    private String updateby;
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm")
    @ApiModelProperty("修改时间")
    private Date updatetime;

    @ApiModelProperty("浏览次数")
    private int visittimes;

    @ApiModelProperty("文章摘要")
    private String abstr;

    @ApiModelProperty("封面照片")
    private String coverimg;

}
